<template>
  <div class="health">
    <!-- <div>布布一二一起的时间：{{ time }}天</div> -->
    <!-- <div @click="update">加一</div> -->
    <UseTable
      :tableData="tableData"
      :columnList="columnList"
      :iSOnlyShow="iSOnlyShow"
    ></UseTable>
  </div>
</template>

<script>
import UseTable from "../components/UseTable.vue";
import { mapState, mapActions } from "vuex";

export default {
  name: "Health",
  components: {
    UseTable,
  },
  data() {
    return {
      //表格数据
      tableData: [
        {
          date: "2016-05-02",
          name: "一二",
          address: "一二",
        },
        {
          date: "2016-05-04",
          name: "布布",
          address: "布布",
        },
      ],
      //表格列
      columnList: [
        {
          prop: "date",
          label: "日期",
        },
        {
          prop: "address",
          label: "地址",
        },
      ],

      //展示按钮
      iSOnlyShow: false,
    };
  },
  computed: {
    ...mapState(["time"]),
  },
  methods: {
    ...mapActions(["updatetime"]),

    update() {
      this.updatetime();
    },
  },
};
</script>
